from dataclasses import dataclass
from typing import Callable

from paramiko.client import SSHClient

from jobs_agency.platforms.cloud import CloudInstanceConfig
from jobs_agency.platforms.ssh import SSHConfig


@dataclass
class AlibabaCloudClientConfig:
    access_key_id: str
    access_key_secret: str
    region_id: str


@dataclass
class AlibabaCloudEcsConfig(CloudInstanceConfig):
    ecs_request: dict
    ssh: SSHConfig
    prepare_func: Callable[[SSHClient], None] | None = None
    prepare_script: str | None = None
    release_script: str | None = None
